These files include the current version of the "OIP.h" file as well as a THINK C 5.0 library entitled: "OIPLib.TC". Also included are THINK C 5.0 examples of the Text Length and Concatenate functions as well as an additional Append Text function. The folder entitled "Serius #includes" and the file "OIPLib.TC" should be placed in the same folder as THINK C before compiling these examples.
The Text Length function has a text object input parameter and a number object output parameter which upon exit contains the length of text in the text object. We are including it to illustrate how a number object is assigned a value.
The functions, Concatenate and Append Text both join together the data of two text objects. However, they accomplish this differently. Concatenate joins two text inputs and produces a text output. Append Text, on the other hand, has no output but rather appends input 2 onto input 1. Thus, Concatenate demonstrates text manipulation to produce an output parameter whereas Append Text is an example of how to change the data of an input parameter.
We have also provided test worksheets that use both functions. A configuration file containing Append Text is also included and should be added to your Objects Folder. We are providing it since Concatenate is already among the Text object functions and Append Text is not.
There are five of the OIP routines documented in the Developer manual (shipped with Serius Developer) that cannot be safely called from C. We have written some "glue" code that will allow you to access them. This is accoplished by using the following C names instead of the Pascal names when calling them.
Pascal Name C Name
GetObjectTypeName C_GetObjectTypeName
GetIndObject C_GetIndObject
GetObjectFromRef C_GetObjectFromRef
GetParameter C_GetParameter
CreateObject C_CreateObject
WITH PARAMETERS
pascal void C_GetObjectTypeName(Str255 theName, long theTypeID)
pascal Str255 GetObjectTypeName(long theTypeID)
pascal void C_GetIndObject(ObjectPtr theObject, long theTypeID,
long theObjectIndex)
pascal ObjectRecord GetIndObject(long theTypeID, long theObjectIndex)